﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NF.Core.Fuzzy
{
    public class RuleSet
    {
        public RuleSet(IEnumerable<Rule> rules, Domain[] domains)
        {
            Build(rules, domains);
        }

        private void Build(IEnumerable<Rule> rules, Domain[] domains)
        {
            int ruleOrder = rules.First().Order;
            if (domains.Length != ruleOrder)
                throw new ArgumentException();

            mDomains = domains;

            int[] lengths =


            mRuleGrid = Array.CreateInstance(typeof(IFuzzySet),
                (from d in mDomains select d.Count).ToArray(),);
            //mRuleGrid = new IFuzzySet[gridSize];
        }

        //private IFuzzySet[] mRuleGrid;
        private Array mRuleGrid;
        private Domain[] mDomains;
    }
}
